let LevitateWindowClose = true;

let deviceWidth = device.width;


var closeBtn = floaty.rawWindow(
    <button text="结束脚本" id="close_LevitateWindow" style="Widget.AppCompat.Button.Colored"/>
);


closeBtn.setTouchable(true);
closeBtn.setSize(250,150);
closeBtn.setPosition(450, 50);

closeBtn.close_LevitateWindow.click(function () {
    // LevitateWindowClose = false;
    engines.stopAll();
});


while(LevitateWindowClose) {
    
}

console.log("结束脚本");
